Christian Hergert [Thu, 31 Dec 2020 18:13:46 +0000 (18:13 +0000)]
Merge branch 'macos-mojave' into 'master'
macos: do not crash in mojave
See merge request GNOME/gtk!3020
Ignacio Casal Quinteiro [Thu, 31 Dec 2020 10:35:04 +0000 (11:35 +0100)]
macos: do not crash in mojave
The localizedName property is not available in Mojave
so just ifdef in that case the code out.
Matthias Clasen [Wed, 30 Dec 2020 03:34:51 +0000 (03:34 +0000)]
Merge branch 'revert-
224c2674' into 'master'
Revert "Merge branch 'gtk_egl_wayland' into 'master'"
See merge request GNOME/gtk!3018
Matthias Clasen [Wed, 30 Dec 2020 03:32:18 +0000 (03:32 +0000)]
Revert "Merge branch 'gtk_egl_wayland' into 'master'"
This reverts merge request !3011
Matthias Clasen [Wed, 30 Dec 2020 03:32:05 +0000 (03:32 +0000)]
Merge branch 'gtk_egl_wayland' into 'master'
Expose gdk_wayland_surface_get_wl_egl_window()
See merge request GNOME/gtk!3011
Matthias Clasen [Tue, 29 Dec 2020 17:47:01 +0000 (17:47 +0000)]
Merge branch 'mcatanzaro/#3509' into 'master'
message dialog: use title style only if there is secondary text
Closes #3509
See merge request GNOME/gtk!3015
Matthias Clasen [Tue, 29 Dec 2020 17:41:49 +0000 (17:41 +0000)]
Merge branch 'fix-menu-alignment' into 'master'
Fix menu item alignment with submenus
See merge request GNOME/gtk!3016
Michael Catanzaro [Tue, 29 Dec 2020 17:12:59 +0000 (11:12 -0600)]
message dialog: use title style only if there is secondary text
If there is no secondary text, then the primary text is just a message,
not a title, and should not use title style.
This partially reverts
1e3ec7c1f993ec8cab4c6608b968e78f9028d662. The
message dialog nown looks like it used to in GTK 3. However, it's still
styled only using a style class rather than using pango markup, as in
GTK 3.
Fixes #3509
Matthias Clasen [Tue, 29 Dec 2020 17:10:35 +0000 (12:10 -0500)]
Fix menu item alignment with submenus
We were not aligning model button labels with nesting
submenus with indicators in their containing menu.
This was visible in the application demo of gtk4-demo.
Timm Bäder [Tue, 29 Dec 2020 16:58:55 +0000 (16:58 +0000)]
Merge branch 'xndcn/fix-shader' into 'master'
gl: Fix implicit leaking of shader object
See merge request GNOME/gtk!3013
Matthias Clasen [Tue, 29 Dec 2020 16:36:09 +0000 (16:36 +0000)]
Merge branch 'ebassi/issue-3522' into 'master'
Fix the Vulkan header check for VK_RESULT_RANGE_SIZE
Closes #3522
See merge request GNOME/gtk!3009
xndcn [Tue, 29 Dec 2020 14:29:37 +0000 (22:29 +0800)]
gl: Fix implicit leaking of shader object
According to OpenGL spec, a shader object will only be flagged
for deletion unless it has been detached; when a program object
is deleted, those shader objects attached to it will be detached
but not deleted unless they have already been flagged for deletion.
So we shall detach a shader object before it is deleted, and delete
it before the program object is deleted best.
Timm Bäder [Tue, 29 Dec 2020 07:49:12 +0000 (07:49 +0000)]
Merge branch 'wip/chergert/volatile-fixes' into 'master'
types: fix various use of volatile in type registration
See merge request GNOME/gtk!2865
Vivek Kasireddy [Tue, 29 Dec 2020 02:20:04 +0000 (18:20 -0800)]
gdk/wayland/surface: Expose gdk_wayland_surface_get_wl_egl_window()
Some GTK based applications such as Qemu UI create and manage
EGLSurfaces associated with the relevant GdkSurfaces. In order to create
an EGLSurface, there needs to be a way to pass the native window
object to eglCreateWindowSurface(). While running in an X environment,
the native window object can be obtained by calling
gdk_x11_surface_get_xid(). Likewise, the native window object can be
obtained by calling gdk_wayland_surface_get_wl_egl_window() while
running in a Wayland environment. Therefore, this API needs to be
exposed to apps.
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Emmanuele Bassi [Mon, 28 Dec 2020 18:41:18 +0000 (18:41 +0000)]
Fix the Vulkan header check for VK_RESULT_RANGE_SIZE
The VK_RESULT_RANGE_SIZE enumeration value was removed in 1.2.140, not
1.2.142.
Fixes: #3522
Benjamin Otte [Mon, 28 Dec 2020 14:54:30 +0000 (14:54 +0000)]
Merge branch 'gtkmediafile-pixel-aspect-ratio' into 'master'
gtkmediafile: Consider pixel-aspect-ratio for rendering video with the correct aspect ratio
Closes #3516
See merge request GNOME/gtk!3007
Asier Sarasua Garmendia [Sun, 27 Dec 2020 17:56:02 +0000 (17:56 +0000)]
Update Basque translation
Sebastian Dröge [Sun, 27 Dec 2020 16:24:26 +0000 (18:24 +0200)]
gtkmediafile: Consider pixel-aspect-ratio for rendering video with the correct aspect ratio
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3516
Matthias Clasen [Sun, 27 Dec 2020 17:06:52 +0000 (17:06 +0000)]
Merge branch 'wip/jtojnar/trivial-fix-pc-vulcan' into 'master'
build: Fix vulkan reference in pc file
Closes #3517
See merge request GNOME/gtk!3006
Fran Dieguez [Sun, 27 Dec 2020 16:56:56 +0000 (16:56 +0000)]
Update Galician translation
Fran Dieguez [Sun, 27 Dec 2020 16:51:38 +0000 (16:51 +0000)]
Update Galician translation
Benjamin Otte [Sun, 27 Dec 2020 06:17:36 +0000 (06:17 +0000)]
Merge branch 'gtkgstsink-unmap-only-when-done' into 'master'
gtkmediafile: Only unmap the GstVideoFrame in the GBytes destroy notify
See merge request GNOME/gtk!3003
Jan Tojnar [Sun, 27 Dec 2020 05:42:29 +0000 (06:42 +0100)]
build: Fix vulkan reference in pc file
A mistake in string concatenation caused the vulcan dependency to be omitted.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
Matthias Clasen [Sun, 27 Dec 2020 05:21:26 +0000 (05:21 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!3004
Matthias Clasen [Sun, 27 Dec 2020 04:32:26 +0000 (04:32 +0000)]
Merge branch 'gtkclip' into 'master'
gtk: remove GtkClipboard leftovers
See merge request GNOME/gtk!2991
Matthias Clasen [Sun, 27 Dec 2020 04:30:38 +0000 (04:30 +0000)]
Merge branch 'wip/carlosg/for-master' into 'master'
gtk/gesturestylus: Convert motion history from surface coordinates
Closes #3491
See merge request GNOME/gtk!2999
Sebastian Dröge [Sat, 26 Dec 2020 12:26:23 +0000 (14:26 +0200)]
gtkmediafile: Only unmap the GstVideoFrame in the GBytes destroy notify
The memory pointed to by GstVideoFrame::plane_data becomes invalid after
unmapping causing the GBytes to point at some random memory if the
unmapping is not deferred until its destroy notify.
When the GStreamer buffer is backed by normal system memory this is not
a problem but if it is backed by e.g. an OpenGL texture, dmabuf or some
other hardware-specific memory this will otherwise cause interesting
problems.
Benjamin Otte [Fri, 25 Dec 2020 18:05:11 +0000 (18:05 +0000)]
Merge branch 'unused-static-inline' into 'master'
Remove unused static inline function
See merge request GNOME/gtk!3002
Emmanuel Gil Peyrot [Fri, 25 Dec 2020 15:11:23 +0000 (16:11 +0100)]
Remove unused static inline function
This was causing a warning on AArch64 since __LITTLE_ENDIAN__ and
__BIG_ENDIAN__ weren’t set, but the functions were actually completely
unused.
Benjamin Otte [Fri, 25 Dec 2020 01:36:34 +0000 (01:36 +0000)]
Merge branch 'gles-gears' into 'master'
Fix gtk4-demo’s gears demo on OpenGL ES
See merge request GNOME/gtk!3000
Emmanuel Gil Peyrot [Fri, 25 Dec 2020 00:29:03 +0000 (01:29 +0100)]
Fix some of gtk4-demo’s transitions example on OpenGL ES
Same issue as the previous commit, int+float is error, and pow() only
works on floats.
Emmanuel Gil Peyrot [Fri, 25 Dec 2020 00:21:08 +0000 (01:21 +0100)]
Fix gtk4-demo’s gears demo on OpenGL ES
Here is a command to reproduce this testcase:
GDK_DEBUG=gl-gles gtk4-demo --run gears
Without this patch, Mesa throws this compile error:
0:130(13): error: no matching function for call to `mod(error, float)'; candidates are:
This is caused by `u_rotation - 90` being of type error since
`u_rotation` is a float and it’s illegal to subtract it with an integer.
Carlos Garnacho [Thu, 24 Dec 2020 18:55:39 +0000 (19:55 +0100)]
gtk/gesturestylus: Convert motion history from surface coordinates
Motion history coordinates are based on GdkSurface coordinates. Transform
the coordinates from the GtkNative they are received on, accounting for the
possible transforms (e.g. due to window borders and shadows).
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3491
Matthias Clasen [Thu, 24 Dec 2020 07:13:22 +0000 (07:13 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!2997
Benjamin Otte [Wed, 23 Dec 2020 19:04:29 +0000 (20:04 +0100)]
gdkarray: Add a "stolen" boolean to splice()
If set to TRUE, does not call the free func for the removed items.
This can be used to move items between arrays without having to do the
refcounting dance.
Benjamin Otte [Tue, 24 Nov 2020 13:19:06 +0000 (14:19 +0100)]
listview: Use the correct scroll policy
Use the horizontal policy for horizontal decisions, not the vertical
one.
This broke in
0011ce949c3580e02c4b2c3d83584a6c6e82090c.
Benjamin Otte [Wed, 25 Nov 2020 14:49:58 +0000 (15:49 +0100)]
docs: Put render nodes in their own sections
Benjamin Otte [Wed, 2 Dec 2020 07:50:16 +0000 (08:50 +0100)]
roundedbox: Remove unused API
Benjamin Otte [Tue, 15 Dec 2020 23:26:16 +0000 (00:26 +0100)]
picture: Fix copy/paste error in docs
Benjamin Otte [Wed, 16 Dec 2020 01:22:26 +0000 (02:22 +0100)]
video: When autoplaying, start playing once the video is prepared
This fixe video sources with longer loading times not automatically
playing.
Benjamin Otte [Thu, 17 Dec 2020 21:20:17 +0000 (22:20 +0100)]
gtk-demo: Don't put the search bar in the scroll area
1. That's a bad idea UI wise as you can't see the search after you
scrolled.
2. That's a bad idea code-wise because Listviews need to be put into
a ScrolledWindow or they won't scroll.
Benjamin Otte [Thu, 24 Dec 2020 05:32:17 +0000 (06:32 +0100)]
rendernode: Bail if matrix is invalid
Invalid matrices are okay in GSK (and GL), but not in Cairo.
Testcase included.
A S Alam [Wed, 23 Dec 2020 19:48:28 +0000 (19:48 +0000)]
Update Punjabi translation
Danial Behzadi [Wed, 23 Dec 2020 15:53:07 +0000 (15:53 +0000)]
Update Persian translation
Matthias Clasen [Wed, 23 Dec 2020 14:03:07 +0000 (09:03 -0500)]
colorbutton: Correct the css docs
Mention the wrapper colorbutton node.
Matthias Clasen [Wed, 23 Dec 2020 13:57:04 +0000 (08:57 -0500)]
fontbutton: Correct the css docs
Mention the wrapper fontbutton node.
Matthias Clasen [Wed, 23 Dec 2020 13:45:51 +0000 (08:45 -0500)]
menubutton: Correct the css docs
We are using menubutton instead of button.popup now.
Matthias Clasen [Wed, 23 Dec 2020 05:48:43 +0000 (00:48 -0500)]
modelbutton: Center titles
The centering of titles was broken in
b5b81dea7f2eff28.
Make it mostly work again by adding an empty end indicator.
Related: #3405
Matthias Clasen [Wed, 23 Dec 2020 03:01:55 +0000 (03:01 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
window: Release application in destroy
See merge request GNOME/gtk!2994
Matthias Clasen [Wed, 23 Dec 2020 01:34:13 +0000 (20:34 -0500)]
window: Release application in destroy
We used to do this; it was lost in some life-cycle
reshuffling.
Marc-André Lureau [Tue, 22 Dec 2020 12:36:13 +0000 (16:36 +0400)]
gtk: remove GtkClipboard leftovers
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Matthias Clasen [Tue, 22 Dec 2020 04:53:31 +0000 (04:53 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master
See merge request GNOME/gtk!2990
Matthias Clasen [Tue, 22 Dec 2020 02:29:03 +0000 (02:29 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2988
Matthias Clasen [Mon, 21 Dec 2020 23:04:16 +0000 (18:04 -0500)]
Fix warnings with Vulkan < 162
Tiring to watch the Vulkan people stumble through
ABI and API compat, but what can you do.
Matthias Clasen [Mon, 21 Dec 2020 22:49:42 +0000 (22:49 +0000)]
Merge branch 'mcatanzaro/fix-gtk-builder-tool' into 'master'
Fix buffer overruns in 'gtk-builder-tool simplify'
See merge request GNOME/gtk!2987
Matthias Clasen [Mon, 21 Dec 2020 22:43:29 +0000 (17:43 -0500)]
modelbutton: Remove an unused field
We're not using the centered field anymore.
Michael Catanzaro [Mon, 21 Dec 2020 21:35:51 +0000 (15:35 -0600)]
Fix buffer overruns in 'gtk-builder-tool simplify'
Oops, here we allocate only one byte for each pointer we want to store.
We need to multiply by the size of a pointer.
Emmanuele Bassi [Mon, 21 Dec 2020 20:04:26 +0000 (20:04 +0000)]
Merge branch 'fix-printbackends' into 'master'
Fix the value for the print-backends setting
Closes #3486
See merge request GNOME/gtk!2986
Matthias Clasen [Mon, 21 Dec 2020 19:22:38 +0000 (19:22 +0000)]
Merge branch 'ebassi/docs-for-master' into 'master'
Ebassi/docs for master
See merge request GNOME/gtk!2983
Matthias Clasen [Mon, 21 Dec 2020 19:10:03 +0000 (14:10 -0500)]
Fix the value for the print-backends setting
This was broken in the meson conversion, causing
us to default to "" instead of the built print
backends.
Fixes: #3486
Matthias Clasen [Mon, 21 Dec 2020 19:00:10 +0000 (19:00 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2984
Matthias Clasen [Mon, 21 Dec 2020 18:11:46 +0000 (13:11 -0500)]
inspector: Show glyphs as in node files
Reuse the glyph serialization code from gsk to
show glyphs in the same way here.
Matthias Clasen [Mon, 21 Dec 2020 18:11:08 +0000 (13:11 -0500)]
gsk: Export the glyph serialization privately
We want to use the same serialization in the inspector,
so export this function.
Matthias Clasen [Mon, 21 Dec 2020 18:08:34 +0000 (13:08 -0500)]
gsk: Improve glyph serialization
The special case for ASCII glyphs is unfortunately not
working very well, because of an oversight in pango:
When I added subpixel positioning, I made pango_shape()
default to not rounding, and make PangoLayout call
pango_shape_with_flags() and pass the rounding information
down. The upshot is that we need to use the _with_flags
variant here and tell it to round position, so it matches
what the text node contains.
Timm Bäder [Mon, 21 Dec 2020 17:16:38 +0000 (17:16 +0000)]
Merge branch 'fix-node-glyphs' into 'master'
gsk: Fix serialization of glyphs
Closes #3496
See merge request GNOME/gtk!2982
Emmanuele Bassi [Mon, 21 Dec 2020 17:11:42 +0000 (17:11 +0000)]
docs: Add examples for GtkDropTarget
Like we did for GtkDragSource.
Emmanuele Bassi [Mon, 21 Dec 2020 17:03:59 +0000 (17:03 +0000)]
docs: Add examples of GtkDragSource use
The description is a bit terse; we should help out application
developers some more.
Emmanuele Bassi [Mon, 21 Dec 2020 17:03:42 +0000 (17:03 +0000)]
docs: Fix typo and whitespace
Matthias Clasen [Mon, 21 Dec 2020 15:46:59 +0000 (10:46 -0500)]
gsk: Fix serialization of glyphs
We were forgetting to put a space between two numbers
in some cases, confusing the parser.
Test included.
Fixes: #3496
Emmanuele Bassi [Mon, 21 Dec 2020 15:40:07 +0000 (15:40 +0000)]
Merge branch 'box_docs' into 'master'
box: improve documentation
Closes #3499
See merge request GNOME/gtk!2981
Yetizone [Mon, 21 Dec 2020 14:42:01 +0000 (16:42 +0200)]
box: improve documentation
Rephrase a function parameter description and remove "." from all function parameters descriptions
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3499
Timm Bäder [Mon, 21 Dec 2020 14:23:25 +0000 (15:23 +0100)]
gskpango: Don't copy fg color
No need to do that here, we copy it in to the individual render nodes
anyway.
Timm Bäder [Mon, 21 Dec 2020 13:13:48 +0000 (14:13 +0100)]
gl renderer: Check for pointer equality in rounded_rect_equal
Timm Bäder [Mon, 21 Dec 2020 12:23:28 +0000 (13:23 +0100)]
gskpango: Correct a comment
Not all other draw calls will use cairo.
Timm Bäder [Mon, 21 Dec 2020 11:56:38 +0000 (12:56 +0100)]
gskpango: Remove bounds rect
We only need this to render shapes and trapezoids, i.e. only when
falling back to cairo. Remove code to measure the layout and convert the
ink_rect to a graphene_rect_t from gtk_snapshot_append_layout() and do
it when drawing shapes and trapezoids instead.
Timm Bäder [Mon, 21 Dec 2020 11:49:06 +0000 (12:49 +0100)]
gskpango: Fix a potential cairo_t leak
The previous early return did not cairo_destroy() it.
Timm Bäder [Mon, 21 Dec 2020 11:44:01 +0000 (12:44 +0100)]
label: Refactor get_layout_location()
Rename a few local variables to be clearer about whether they belong to
the widget or to the layout.
Remove a workaround for an old bug that is no longer valid. We don't
underallocate the layout anymore. Aways center vertically, with respect
to the yalign.
Timm Bäder [Mon, 21 Dec 2020 11:26:22 +0000 (12:26 +0100)]
label: Refactor snapshot()
Use two early-out style if statements to reduce indentation in this
entire function.
Timm Bäder [Mon, 21 Dec 2020 09:21:24 +0000 (10:21 +0100)]
textlayout: Remove dead offset_y code
Timm Bäder [Mon, 21 Dec 2020 08:56:58 +0000 (09:56 +0100)]
rendernode: Different uniformity in border nodes
Means they are different and a diff is impossible.
Timm Bäder [Mon, 21 Dec 2020 08:56:19 +0000 (09:56 +0100)]
rendernode: Sort diff() requirements by complexity
Timm Bäder [Mon, 21 Dec 2020 08:28:26 +0000 (09:28 +0100)]
renderborder: Avoid 0 width outline color nodes
Timm Bäder [Mon, 21 Dec 2020 07:34:25 +0000 (08:34 +0100)]
layoutoverlay: Avoid adding transparent color nodes
We have a region for the border here, but the color is defined as
transparent black because we don't want to render anything for it.
This way, the generated .node file for the listbox demo in gtk4-demo
with enabled layout borders is 3.5MB instead of 3.8MB.
Timm Bäder [Mon, 21 Dec 2020 07:30:51 +0000 (08:30 +0100)]
layoutoverlay: Avoid adding 0 sized color nodes
This way, the output node file of the listbox demo in gtk4-demo with
enabled layout borders is only 3.8MB instead of 12MB.
Timm Bäder [Sun, 20 Dec 2020 20:22:15 +0000 (21:22 +0100)]
GskTransform: Add nullable annotations to _equals()
Both can be NULL here.
Timm Bäder [Fri, 18 Dec 2020 17:28:17 +0000 (18:28 +0100)]
gl renderer: Proper state tracking for color matrix ops
Timm Bäder [Fri, 18 Dec 2020 17:13:28 +0000 (18:13 +0100)]
gl renderer: Add missing debug output for repeat ops
Timm Bäder [Fri, 18 Dec 2020 16:29:51 +0000 (17:29 +0100)]
gl renderer: Create shader-global uniform ops on draw()
This way we can render the first frame of tests/testoutsetshadowdrawing
in 153 ops instead of 183.
And the first frame of gtk4-demo in 260 instead of 300.
Timm Bäder [Fri, 18 Dec 2020 15:14:11 +0000 (16:14 +0100)]
gl renderer: Unify new clip/viewport rects in blur_texture()
Timm Bäder [Fri, 18 Dec 2020 09:12:28 +0000 (10:12 +0100)]
GskTransform: Fix identity transform class name
Timm Bäder [Fri, 18 Dec 2020 09:10:56 +0000 (10:10 +0100)]
GskTransform: Avoid a ref+unref pair
If gsk_transform_is_identity() returned FALSE for the next transform,
the previous code did a ref + unref pair, even though it was unneeded.
Timm Bäder [Fri, 18 Dec 2020 07:36:59 +0000 (08:36 +0100)]
icontheme: Make some constant values const
Timm Bäder [Thu, 17 Dec 2020 18:29:16 +0000 (19:29 +0100)]
pixbufutils: Only convert icon size to string once
Timm Bäder [Thu, 17 Dec 2020 17:45:47 +0000 (18:45 +0100)]
icontheme: Make icon_paintable_ensure_texture() return an unowned value
It's private, has only one caller and that one doesn't need the extra
ref.
Timm Bäder [Thu, 17 Dec 2020 16:24:31 +0000 (17:24 +0100)]
gl renderer: Avoid setting modelview to identical values
The previous comment here was incorrect. We can save the op itself, we
just can't save us the entry in the modelview stack.
Timm Bäder [Thu, 17 Dec 2020 15:32:31 +0000 (16:32 +0100)]
main: Add & use gdk_event_dup_axes()
The way this code is written trips up scan-build. Add
gdk_event_dup_axes() and use it in gtkmain.c.
Rafael Fontenelle [Mon, 21 Dec 2020 07:02:13 +0000 (07:02 +0000)]
Update Brazilian Portuguese translation
Matthias Clasen [Sun, 20 Dec 2020 22:40:48 +0000 (22:40 +0000)]
Merge branch 'ebassi/issue-3495' into 'master'
Use full path when calling gtk4-update-icon-cache
Closes #3495
See merge request GNOME/gtk!2979
Emmanuele Bassi [Sun, 20 Dec 2020 16:33:41 +0000 (16:33 +0000)]
Call the newly installed gtk4-update-icon-cache
Otherwise we rely on whatever it's inside the PATH.
Emmanuele Bassi [Sun, 20 Dec 2020 16:33:25 +0000 (16:33 +0000)]
Pass the bindir to the post-install script